﻿//     Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;

namespace Gateway.UpdateService
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            // Web API configuration and services

            // Web API routes
            config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(
                name: "PackageApi",
                routeTemplate: "{controller}/{version}/{package}/{file}",
                defaults: new 
                { 
                    version = RouteParameter.Optional,
                    package = RouteParameter.Optional,
                    file = RouteParameter.Optional,
                }
            );
        }
    }
}
